﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace UFIDA.U9.Cust.SH.SHFastShipBListUIModel
{
	[Serializable]
	public partial class SHFastShipBListUIModelModel : UIModel
	{
		#region Constructor
		public SHFastShipBListUIModelModel() : base("SHFastShipBListUIModel")
		{
			InitClass();
			this.SetResourceInfo("de8e6d77-b49e-485c-9f2f-e59264e5686b");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private SHFastShipBListUIModelModel(bool isInit) : base("SHFastShipBListUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new SHFastShipBListUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private SHFastShipView viewSHFastShip;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public SHFastShipView SHFastShip
		{
			get { return (SHFastShipView)this["SHFastShip"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewSHFastShip = new SHFastShipView(this);
			this.viewSHFastShip.SetResourceInfo("88f2ec6e-cb7e-4103-a889-def8dd11abf6");
			this.Views.Add(this.viewSHFastShip);			

			
		}

		public override string AssemblyName
		{
			get { return "UFIDA.U9.Cust.SH.SHFastShipUI"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class SHFastShipView : UIView
	{
		#region Constructor
		public SHFastShipView(IUIModel model) : base(model,"SHFastShip","UFIDA.U9.Cust.SH.SHFastShipBE.SHFastShip", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private SHFastShipView():base(null,"SHFastShip","UFIDA.U9.Cust.SH.SHFastShipBE.SHFastShip", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new SHFastShipView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}


		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "ID", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","fc982d8a-0e9a-4079-9e55-ce66e8e5081b");


		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new SHFastShipRecord(builder);
		}
		#endregion

		#region new method
		public new SHFastShipRecord FocusedRecord
		{
			get { return (SHFastShipRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new SHFastShipRecord AddNewUIRecord()
		{	
			return (SHFastShipRecord)base.AddNewUIRecord();
		}
		public new SHFastShipRecord NewUIRecord()
		{	
			return (SHFastShipRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class SHFastShipRecord : UIRecord
	{
		#region Constructor
		public SHFastShipRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private SHFastShipView uiviewSHFastShip
		{
			get { return (SHFastShipView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new SHFastShipRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewSHFastShip.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewSHFastShip.FieldID);
			}
			set{
				this[this.uiviewSHFastShip.FieldID] = value;
			}
		}
		#endregion
	}
	



}